﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WpfApp_Binding.DataSource
{
    /// <summary>
    /// ObjectDataSourceWindow.xaml 的交互逻辑
    /// </summary>
    public partial class ObjectDataSourceWindow : Window
    {

        public List<Student> students = new List<Student>();

        public ObjectDataSourceWindow()
        {
            InitializeComponent();
            students.Add(new Student 
            {
                Id = 1,
                Name = "张三111",
                Description = "1111"
            });
            students.Add(new Student
            {
                Id = 2,
                Name = "张三111",
                Description = "1111"
            });
            students.Add(new Student
            {
                Id = 3,
                Name = "张三111",
                Description = "1111"
            });
            this.lv.ItemsSource = students;
        }

        
    }
}
